// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: "2024-11-01",
  devtools: { enabled: true },
  //初始化样式
  // css: ["~/assets/global.scss"],

  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: '@use "~/assets/global.scss" as *;',
        },
      },
    },
  },
  build: {
    transpile: ["pinia-plugin-persistedstate"],
  },
  modules: [
    "@element-plus/nuxt",
    "@pinia/nuxt",
    "@pinia-plugin-persistedstate/nuxt",
  ],
  //运行时的全局变量
  runtimeConfig: {
    //只能在服务器端获取到
    count: 1,
    //在服务器和客户端都可以获取
    public: {
      baseURL: "http://localhost:3200",
    },
  },
  //打包
  $production: {},
  //开发
  $development: {},
});
